<?php
function BuildHtmlTypicalWorks($idP)
{
    global $show_page;
    
    $listcat        = ListCatChild('iId,cImage,cName,cUrlString,iParentId',$idP,false,0,'tblcategory',true);
    $html           = '<div id="ajaxPage">';
    foreach($listcat as $i=>$cat)
    {
        $link       = getLinkParentCat($cat['iParentId']).'/'.$cat['cUrlString'];
        $imglink    = GetIntroImg($cat['cImage'],true);
        if($i%2==0)
        {
            $html.='<div class="clear"></div>';
        }
        $html   .= '<a class="list2" href="'.echoLink($link,false).'">';
        $html   .= '<span class="img"><img src="'.($imglink).'" width="100%" border="0"/></span>';
        $html   .= '<span class="ttl">'.$cat['cName'].'</span>';
        $html   .= '</a>';
    }   
    $html       .= $show_page;
    $html       .= '</div>';
    return $html;
}
?>